<template>
    <div class="mui-numbox" data-numbox-step='1' data-numbox-min='1' data-numbox-max='60'>
		<button class="mui-btn mui-btn-numbox-minus" type="button">-</button>
		<input id="test" class="mui-input-numbox" type="number" value="1" @change='countChanged' ref="numbox"/>
		<button class="mui-btn mui-btn-numbox-plus" type="button">+</button>
	</div>
</template>

<script>
    //导入mui的JS文件
    import mui from '../../lib/mui/js/mui.min.js'

    export default{
       mounted() {//numbox初始化
          mui(".mui-numbox").numbox()
         //  mui(".mui-numbox").numbox().setOption('step',1)  
       },
      methods:{
        countChanged(){
           this.$emit('func',parseInt(this.$refs.numbox.value));//refs相当于节点,this.$refs.numbox.value就是input的值
         }
      }
    }
</script>

<style lang="less" scoped>
     
  
</style>

